package cn.gson.springboot.model.pojos;

import java.io.Serializable;
import javax.persistence.*;

import net.sf.jsqlparser.expression.DateTimeLiteralExpression.DateTime;

import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the doctors_advice database table.
 * 
 */
@Entity
@Table(name="doctors_advice")
@NamedQuery(name="DoctorsAdvice.findAll", query="SELECT d FROM DoctorsAdvice d")
public class DoctorsAdvice implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="docadvice_id")
	private int docadviceId;

	@Column(name="doc_begintime")
	private Timestamp docBegintime;

	@Column(name="doc_drugallnumber")
	private int docDrugallnumber;

	@Column(name="doc_endtime")
	private Timestamp docEndtime;

	@Column(name="doc_moneytype")
	private int docMoneytype;

	@Lob
	@Column(name="docadvice_conent")
	private String docadviceConent;

	@Column(name="doctor_type")
	private int doctorType;

	@Lob
	@Column(name="doc_reason")
	private String docReason;
	
	@Lob
	@Column(name="doc_result")
	private String docResult;
	
	//bi-directional many-to-one association to DoctoradviceDetail
	@OneToMany(mappedBy="doctorsAdvice")
	private List<DoctoradviceDetail> doctoradviceDetails;

	//bi-directional many-to-one association to InhospitalReg
	@ManyToOne
	@JoinColumn(name="hosp_id")
	private InhospitalReg inhospitalReg;

	//bi-directional many-to-one association to LookIllness
	@ManyToOne
	@JoinColumn(name="lookillness_id")
	private LookIllness lookIllness;

	public DoctorsAdvice() {
	}

	public int getDocadviceId() {
		return this.docadviceId;
	}

	public void setDocadviceId(int docadviceId) {
		this.docadviceId = docadviceId;
	}

	public Timestamp getDocBegintime() {
		return this.docBegintime;
	}

	public void setDocBegintime(Timestamp docBegintime) {
		this.docBegintime = docBegintime;
	}

	public int getDocDrugallnumber() {
		return this.docDrugallnumber;
	}

	public void setDocDrugallnumber(int docDrugallnumber) {
		this.docDrugallnumber = docDrugallnumber;
	}

	public Timestamp getDocEndtime() {
		return this.docEndtime;
	}

	public void setDocEndtime(Timestamp docEndtime) {
		this.docEndtime = docEndtime;
	}

	public int getDocMoneytype() {
		return this.docMoneytype;
	}

	public void setDocMoneytype(int docMoneytype) {
		this.docMoneytype = docMoneytype;
	}

	public String getDocadviceConent() {
		return this.docadviceConent;
	}

	public void setDocadviceConent(String docadviceConent) {
		this.docadviceConent = docadviceConent;
	}

	public int getDoctorType() {
		return this.doctorType;
	}

	public void setDoctorType(int doctorType) {
		this.doctorType = doctorType;
	}

	
	public String getDocReason() {
		return docReason;
	}

	public void setDocReason(String docReason) {
		this.docReason = docReason;
	}

	public String getDocResult() {
		return docResult;
	}

	public void setDocResult(String docResult) {
		this.docResult = docResult;
	}

	public List<DoctoradviceDetail> getDoctoradviceDetails() {
		return this.doctoradviceDetails;
	}

	public void setDoctoradviceDetails(List<DoctoradviceDetail> doctoradviceDetails) {
		this.doctoradviceDetails = doctoradviceDetails;
	}

	public DoctoradviceDetail addDoctoradviceDetail(DoctoradviceDetail doctoradviceDetail) {
		getDoctoradviceDetails().add(doctoradviceDetail);
		doctoradviceDetail.setDoctorsAdvice(this);

		return doctoradviceDetail;
	}

	public DoctoradviceDetail removeDoctoradviceDetail(DoctoradviceDetail doctoradviceDetail) {
		getDoctoradviceDetails().remove(doctoradviceDetail);
		doctoradviceDetail.setDoctorsAdvice(null);

		return doctoradviceDetail;
	}

	public InhospitalReg getInhospitalReg() {
		return this.inhospitalReg;
	}

	public void setInhospitalReg(InhospitalReg inhospitalReg) {
		this.inhospitalReg = inhospitalReg;
	}

	public LookIllness getLookIllness() {
		return this.lookIllness;
	}

	public void setLookIllness(LookIllness lookIllness) {
		this.lookIllness = lookIllness;
	}

}